<template>
  <div>
      <!--危急值上报弹窗-->
      <table class="dialogdanger">
          <tr>
              <td>
                  <table style="width:580px">
                      <tr>
                          <td colspan="2" style="text-align:left">
                              <!-- <el-checkbox v-model="sendbyhis">通过HIS接口发送到临床</el-checkbox> -->
                          </td>
                          <td style="color:red;font-size:20px;text-align:center">危急值</td>
                      </tr>
                      <tr>
                          <td style="text-align:left">
                              <el-checkbox v-model="noticebyphone" @change="phonechange">电话通知</el-checkbox>
                          </td>
                          <td>被通知人</td>
                          <td style="text-align:left">
                              <el-input v-model="noticeddoctorname" :disabled="!noticebyphone" @dblclick.native="popdatatype='LIS3_req_docno',dialogTableVisible=true,noticedflag=1" @change="popinputchange($event,'LIS3_req_docno')" @focus="InputFocus()" style="width:200px" ref="noticedoctor"></el-input>
                          </td>
                          <td>
                              <el-checkbox v-model="retelled" :disabled="!noticebyphone">已复述</el-checkbox>
                          </td>
                      </tr>
                      <tr>
                          <td style="text-align:left">
                              <el-checkbox v-model="noticebymsg">短信通知</el-checkbox>
                          </td>
                          <td>电话号码</td>
                          <td style="text-align:left">
                              <el-input v-model="telephonenum" :disabled="!noticebymsg" @dblclick.native="popdatatype='LIS3_req_docno',dialogTableVisible=true,noticedflag=2" style="width:200px"></el-input>
                          </td>
                          <td>
                              <el-checkbox v-model="msgtodutyman" :disabled="!noticebymsg">短信相关负责人</el-checkbox>
                          </td>
                      </tr>
                      <tr>
                          <td>
                          </td>
                          <td>备注说明</td>
                          <td style="text-align:left">
                              <el-input v-model="remarks" style="width:200px" ref="alertmemo" @dblclick.native="dialogMemoVisible = true"></el-input>
                          </td>
                          <td>
                              <el-checkbox v-model="noticeinfec" :disabled="!noticebymsg">通知感染科室</el-checkbox>
                          </td>
                      </tr>
                      <tr>
                          <td>
                          </td>
                          <td>短信格式</td>
                          <td colspan="2" rowspan="5">
                              <el-input v-model="msgstyle" style="color:red" type="textarea" :rows="5" disabled></el-input>
                          </td>
                      </tr>
                      <tr>
                          <td colspan="2">
                              <table style="padding:5px">
                                  <tr>
                                      <td style="text-align:left;width:40px">
                                          上报人
                                      </td>
                                      <td style="text-align:left">
                                          <el-input v-model="ExaminreportManName" @dblclick.native="popdatatype='LIS3_rechk_user',dialogTableVisible=true,noticedflag=3"></el-input>
                                      </td>
                                  </tr>
                              </table>
                          </td>
                      </tr>
                  </table>
              </td>
              <td>
                  <table class="dangerPatInfo">
                      <tr>
                          <td>病人号</td>
                          <td colspan="3">{{PatientInfo.pat_no}}</td>
                      </tr>
                      <tr>
                          <td>样本号</td>
                          <td colspan="3">{{PatientInfo.sampleno}}</td>
                      </tr>
                      <tr>
                          <td>病人姓名</td>
                          <td colspan="3">{{PatientInfo.pat_name}}</td>
                      </tr>
                      <tr>
                          <td>性别</td>
                          <td>{{PatientInfo.pat_sexname}}</td>
                          <td>年龄</td>
                          <td>{{PatientInfo.pat_agestr}}</td>
                      </tr>
                      <tr>
                          <td>病人电话</td>
                          <td colspan="3">{{PatientInfo.pat_phone}}</td>
                      </tr>
                      <tr>
                          <td>申请科室</td>
                          <td colspan="3">{{PatientInfo.req_deptnoname}}</td>
                      </tr>
                      <tr>
                          <td>科室电话</td>
                          <td colspan="3">{{PatientInfo.depttel}}</td>
                      </tr>
                      <tr>
                          <td>申请医生</td>
                          <td colspan="3">{{PatientInfo.req_docnoname}}</td>
                      </tr>
                      <tr>
                          <td>病人病区</td>
                          <td colspan="3">{{PatientInfo.req_wardnoname}}</td>
                      </tr>
                      <tr>
                          <td>病区电话</td>
                          <td colspan="3">{{PatientInfo.wardtel}}</td>
                      </tr>
                      <tr>
                          <td>病人类别</td>
                          <td>{{PatientInfo.pat_typecodename}}</td>
                          <td>床号</td>
                          <td>{{PatientInfo.req_bedno}}</td>
                      </tr>
                      <tr>
                          <td>临床诊断</td>
                          <td colspan="3">{{PatientInfo.pat_diag}}</td>
                      </tr>
                      <tr>
                          <td>标本类型</td>
                          <td colspan="3">{{PatientInfo.specimen_codename}}</td>
                      </tr>
                  </table>
              </td>
          </tr>
          <tr>
              <td colspan="2">
                  <table style="width:100%">
                      <tr>
                          <td style="width:660px;">
                              <div style="height:150px;width:660px;">
                                  <vxe-table :data="tableDataDanger1" border height="150px" highlight-current-row show-overflow="tooltip" highlight-hover-row resizable size="mini" stripe style="margin-top:1px" :edit-config="{trigger: 'click', mode: 'cell',showStatus: true,showIcon:false}" :select-config="{ checkAll: true }" ref="xTableDanger1" @cell-click="ResultCellClick">
                                      <vxe-table-column type="selection" title="" width="40px" v-if="NotAllflag" align="center"></vxe-table-column>
                                      <vxe-table-column :field="item.field" :key="item.field" :title="item.title" :width="item.width" v-for="item in tableColumnDanger1" :edit-render="{name: 'input', autoselect: true}">
                                          <template v-slot="{ row }" v-if="item.field == 'rpt_itemname'">
                                              <div :style="ResultClassName(row)">
                                                  <span>{{row.rpt_itemname}}</span>
                                              </div>
                                          </template>
                                          <template v-else v-slot:edit="{ row }">
                                              <el-input v-model="row.redo_result" v-if="item.field == 'redo_result' && myredoflag > 0 && row.canredoupdate == '1'"></el-input>
                                              <span v-else>{{ row[item.field] }}</span>
                                          </template>
                                      </vxe-table-column>
                                  </vxe-table>
                              </div>
                          </td>
                          <td>
                              <table v-if="!NotAllflag" style="width:100%">
                                  <tr>
                                      <td style="height:30px;text-align:center">
                                          <el-button @click="confirm()">立即上报</el-button>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td style="height:30px;text-align:center">
                                          <el-button  :disabled="nocanceluploadalert" @click="abandon()">放弃上报</el-button>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td style="height:30px;text-align:center">
                                          <el-button @click="cancel()">取消审核</el-button>
                                      </td>
                                  </tr>
                              </table>

                              <table v-if="NotAllflag" style="width:100%">
                                  <tr>
                                      <td style="height:30px;text-align:center">
                                          <el-radio v-model="alertrelease" label="1" @change="AlertReleaseChange" :disabled="alertdisabled">发布</el-radio>
                                          <el-radio v-model="alertrelease" label="0" @change="AlertReleaseChange" :disabled="unalertdisabled">召回</el-radio>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td style="height:30px;;text-align:center">
                                          <el-button @click="AlertDangerForOne()">确定</el-button>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td style="height:30px;;text-align:center">
                                          <el-button @click="cancel()">取消</el-button>
                                      </td>
                                  </tr>
                              </table>
                          </td>
                      </tr>
                  </table>
              </td>
          </tr>
          <tr>
              <td colspan="2">
                  <div style="height:200px;width:860px;">
                      <vxe-table :data="tableDataDanger2" border height="200px" highlight-current-row highlight-hover-row show-overflow="tooltip" resizable size="mini" stripe style="margin-top:5px" ref="xTableDanger2">
                          <vxe-table-column :field="item.field" :key="item.field" :title="item.title" :width="item.width" v-for="item in tableColumnDanger2">
                          </vxe-table-column>
                      </vxe-table>
                  </div>
              </td>
          </tr>
      </table>

      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="" :visible.sync="dialogTableVisible" v-if="dialogTableVisible">
          <rm-pop-common @cancel="dialogTableVisible=false" :datatype="popdatatype" :rptunitid="PatientInfo.rptunitid" :pat_name="PatientInfo.pat_name" :pat_no="PatientInfo.pat_no" :pat_id="PatientInfo.pat_id" :inp_id="PatientInfo.inp_id" :pat_typecode="PatientInfo.pat_typecode" :req_wardno="PatientInfo.req_wardno"  @change="popchange"></rm-pop-common>
          <!--LIS3_xxx-->
      </el-dialog>

      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="" :visible.sync="dialogMemoVisible" v-if="dialogMemoVisible">
          <rm-pop-common @cancel="dialogMemoVisible=false" datatype="seccode" kindno="alertcomm" @change="memochange"></rm-pop-common>
          <!--LIS3_xxx-->
      </el-dialog>
      <!--关联报告项目开窗-->
      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="关联报告项目查看" :visible.sync="dialogLinkRptVisible" v-if="dialogLinkRptVisible" width="50%">
          <rm-pop-linkitem :linkitemcode="linkitemcode" :reportid="myreportid" :rptunitid="PatientInfo.rptunitid" :pOptions="Options" @cancel="LinkItemCancel"></rm-pop-linkitem>
      </el-dialog>
  </div>
</template>
<script>
export default {
  props: ["reportid", "redoflag", "checkuser", "AllFlag", "reportuser"],
  data() {
      return {
          myreportid: this.reportid,
          myredoflag: this.redoflag,
          mycheckuser: this.checkuser,
          myreportuser: this.reportuser,
          //myredoflag: "1",
          //危急值上报弹出框
          sendbyhis: false,
          noticebyphone: true,
          retelled: false,
          noticedflag: 1,
          noticeddoctor: "", //被通知医生号
          noticeddoctorname: "", //被通知医生姓名
          noticebymsg: false, //短信通知
          telephonenum: "", //电话号码
          msgtodutyman: false,
          remarks: "",
          noticeinfec: false,
          msgstyle: "", //短信格式
          ExaminreportMan: "",
          ExaminreportManName: "",
          tableDataDanger1: [],
          tableDataDanger1All: [], //包含待发布和待召回的全部危急值
          tableColumnDanger1: [],
          tableDataDanger2: [],
          tableColumnDanger2: [],
          PatientInfo: {}, //病人报告信息
          dialogTableVisible: false, //医生弹窗
          InputCodeArr: [],
          popdatatype: "",
          dialogMemoVisible: false, //备注弹窗
          Options: [],
          NotAllflag: false, //单独上报危急值标志
          alertrelease: "", //为0召回，为1发布
          alertdisabled: true, //发布禁用标志
          unalertdisabled: true, //禁用禁用标志
          nocanceluploadalert: false,//审核时禁止放弃上报危急值
          linkitemcode: "",//关联项目代码
          dialogLinkRptVisible: false,
      };
  },
  created() {
      this.NotAllflag = this.AllFlag != null && this.AllFlag != "undefined" ? this.AllFlag : false;
      this.QueryInfo();
  },
  methods: {
      QueryInfo() {
          this.$tool
              .request({
                  url: "ucent/popalert",
                  method: "post",
                  data: {
                      action: "getalertpop",
                      reportid: this.reportid,
                      alertrelease: this.NotAllflag ? "1" : "0"
                  }
              })
              .then(res => {
                  if (res) {
                      if (this.myredoflag > 0) {
                          for (let i = 0; i < res.VXtabs[0].Data.length; i++) {
                              var row = res.VXtabs[0].Data[i];
                              if (this.myredoflag == "1" && row.redo_result == "") res.VXtabs[0].Data[i].canredoupdate = "1";
                              else if (this.myredoflag == "2") res.VXtabs[0].Data[i].canredoupdate = "1";
                              else res.VXtabs[0].Data[i].canredoupdate = "0";
                          }
                      }
                      this.tableColumnDanger1 = res.VXtabs[0].Cols;
                      this.tableDataDanger1All = res.VXtabs[0].Data;

                      if (this.NotAllflag) {
                          this.alertrelease = "";
                          if (this.tableDataDanger1All.find(item => item.alertrelease != "1")) {
                              this.tableDataDanger1 = res.VXtabs[0].Data.filter(item => item.alertrelease != "1");
                              this.alertdisabled = false;
                              this.alertrelease = "1";
                          } else this.alertdisabled = true;
                          if (this.tableDataDanger1All.find(item => item.alertrelease == "1")) {
                              this.unalertdisabled = false;
                              if (this.alertrelease == "") {
                                  this.tableDataDanger1 = res.VXtabs[0].Data.filter(item => item.alertrelease != "0");
                                  this.alertrelease = "0";
                              }
                          } else this.unalertdisabled = true;
                      } else {
                          this.tableDataDanger1 = this.tableDataDanger1All;
                      }

                      this.tableColumnDanger2 = res.VXtabs[1].Cols;
                      this.tableDataDanger2 = res.VXtabs[1].Data;
                      this.msgstyle = res.alertinfo.replace("\\r\\n", "\n");
                      this.PatientInfo = res.report;
                      this.Options = res.Option;

                      if (this.Options.nocanceluploadalert=="1"){
                          this.nocanceluploadalert = true;
                      }
                      if (this.Options.alertmanisrechk == "1") {
                          this.ExaminreportManName = this.mycheckuser.username;
                          this.ExaminreportMan = this.mycheckuser.userno;
                      } else {
                          //优先使用当前登录的检验者，没有登录的时候在使用报告的检验者
                          if(this.myreportuser && this.myreportuser.userno){
                              this.ExaminreportManName = this.myreportuser.username;
                              this.ExaminreportMan = this.myreportuser.userno;
                          } else {
                              this.ExaminreportManName = this.PatientInfo.report_username;
                              this.ExaminreportMan = this.PatientInfo.report_user;
                          } 
                      }
                      if (this.Options.alertreportbytel == "1" || this.Options.checkalertman=="1") {
                          this.noticebyphone = true;
                          //页面初始化的时候也要判断下选项【危急值上报电话通知时默认勾选已复述】是否开启
                          if (this.Options.repeatflagdefault1 == "1") this.retelled = true;
                      } else {
                          this.noticebyphone = false;
                      }
                      if (this.Options.alertreportbytel == "1" && this.Options.alertnorectelman == "1") {
                          this.noticeddoctor = this.PatientInfo.req_docno;
                          this.noticeddoctorname = this.PatientInfo.req_docnoname;
                      }
                      if(this.Options.alertpopwithvoice == "1"){
                          if (typeof jsObj != "undefined") {
                              jsObj.Speek(this.PatientInfo.rptunitname + "单元的"+ this.PatientInfo.sampleno + "号标本有危急值上报：" + this.msgstyle);
                          }
                      }
                  }
              });
      },
      LinkItemCancel() {
          this.dialogLinkRptVisible = false;
      },
      ResultCellClick({ row, column }) {
          if (column.property == "rpt_itemname") {
              if (row.linkitemfalg == "1") {
                  this.linkitemcode = row.rpt_itemcode;
                  this.dialogLinkRptVisible = true;
              }
          }
      },
      ResultClassName(row) {
          console.log(row);
          var stylestr = "padding:0 3px;";
          if (row.linkitemfalg == "1") stylestr += "text-decoration:underline;";
          return stylestr;
      },
      cancel() {
          this.$emit("cancel");
      },
      confirm() {
          if (!this.noticeddoctor && this.Options.alertneedrectelman == "1") {
              this.$alert("危急值上报必须填写通知人", "提示").then(() => {});
          } else {
              if(this.Options.alertmustinputalertuser == "1") {
                  this.$rm_Login({
                      type: "请输入上报人工号和密码",
                      btn: {
                          confirmBtnText: "确定",
                          cancelBtnText: "取消"
                      }
                  })
                      .then(res => {
                          if (res.flag == "1") {
                              this.ExaminreportMan = res.userid;
                              this.ExaminreportManName = res.username;
                              this.setAlertInfo();
                          } else {
                              this.$message.error("用户账号密码输入错误！");
                          }
                      })
                      .catch(e => {
                          console.log("error", e);
                      });
              } else {
                  this.setAlertInfo();
              }
          }
      },
      setAlertInfo() {
          var update = this.$refs.xTableDanger1.getRecordset().updateRecords;
          var results = [];
          for (let i = 0; i < update.length; i++) {
              var newrow = { reportid: this.myreportid, rpt_itemcode: update[i].cdata.rpt_itemcode, redo_result: update[i].cdata.redo_result };
              results.push(newrow);
          }
          var alertinfo = {
              chksendhis: this.sendbyhis ? "1" : "0",
              chkphone: this.noticebyphone ? "1" : "0",
              chkmessage: this.noticebymsg ? "1" : "0",
              chkrepeat: this.retelled ? "1" : "0",
              chkmsguser: this.msgtodutyman ? "1" : "0",
              chkmsggrdept: this.noticeinfec ? "1" : "0",
              alertuser: this.ExaminreportMan,
              rectelman: this.noticeddoctor,
              shortmsgtelnum: this.telephonenum,
              memo: this.remarks,
              hisdeptno: this.PatientInfo.req_deptno,
              hiswardno: this.PatientInfo.req_wardno,
              results: results
          };
          this.$emit("confirminfo", { alertinfo: alertinfo, results: results, rptinfo: this.PatientInfo });
          this.$emit("confirm", alertinfo, results);
      },
      abandon() {
          var update = this.$refs.xTableDanger1.getRecordset().updateRecords;
          var results = [];
          for (let i = 0; i < update.length; i++) {
              var newrow = { reportid: this.myreportid, rpt_itemcode: update[i].cdata.rpt_itemcode, redo_result: update[i].cdata.redo_result };
              results.push(newrow);
          }
          var alertinfo = {
              chksendhis: this.sendbyhis ? "1" : "0",
              chkphone: this.noticebyphone ? "1" : "0",
              chkmessage: this.noticebymsg ? "1" : "0",
              chkrepeat: this.retelled ? "1" : "0",
              chkmsguser: this.msgtodutyman ? "1" : "0",
              chkmsggrdept: this.noticeinfec ? "1" : "0",
              alertuser: this.ExaminreportMan,
              rectelman: this.noticeddoctor,
              shortmsgtelnum: this.telephonenum,
              memo: this.remarks,
              hisdeptno: this.PatientInfo.req_deptno,
              hiswardno: this.PatientInfo.req_wardno,
              results: results
          };
          this.$confirm("您确定要放弃上报危急值吗？", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              focusCancelButton: true,
              type: "warning"
          }).then(() => {
              if (this.remarks) {
                  this.$emit("abandoninfo", { alertinfo: alertinfo, results: results, rptinfo: this.PatientInfo });
                  this.$emit("abandon", alertinfo, results);
              } else {
                  this.$alert("放弃上报必须输入备注", "提示").then(() => {
                      this.$refs.alertmemo.focus();
                  });
              }
          });
      },
      popchange(c, v, row) {
          switch (this.noticedflag) {
              case 1:
                  this.noticeddoctor = c;
                  this.noticeddoctorname = v;
                  break;
              case 2:
                  this.telephonenum = row.shortmsgcode;
                  break;
              case 3:
                  this.$rm_Login({
                      type: "请输入上报人工号和密码",
                      btn: {
                          confirmBtnText: "确定",
                          cancelBtnText: "取消"
                      }
                  })
                      .then(res => {
                          if (res.flag == "1") {
                              this.ExaminreportMan = res.userid;
                              this.ExaminreportManName = res.username;
                          } else {
                              //登录失败
                          }
                      })
                      .catch(e => {
                          console.log("error", e);
                      });
                  break;
          }
          this.dialogTableVisible = false;
      },
      memochange(c, name, row) {
          this.remarks = name;
          this.dialogMemoVisible = false;
      },
      InputFocus() {
          this.popdatatype = "LIS3_req_docno";
          this.Queryddl();
          this.$refs.noticedoctor.select();
      },
      Queryddl() {
          if (this.InputCodeArr.filter(item => item.key == this.popdatatype).length == 0) {
              this.$tool
                  .request({
                      url: "ucent/ddl",
                      method: "post",
                      data: {
                          action: this.popdatatype,
                          rptunitid: this.PatientInfo.rptunitid
                      }
                  })
                  .then(res => {
                      if (!res.hasOwnProperty("errcode")) {
                          this.InputCodeArr.push({ key: this.popdatatype, list: res });
                      }
                  });
          }
      },
      phonechange(val) {
          if (val && this.Options.repeatflagdefault1 == "1") {
              this.retelled = true;
          }
      },
      popinputchange(value, type) {
          if (value.trim()) {
              var list = this.InputCodeArr.filter(item => item.key == this.popdatatype);
              if (list.length > 0) {
                  var row = list[0].list.Data.filter(item => (item.inputcode + "").toUpperCase() == (value + "").toUpperCase() || (item.hidkey + "").toUpperCase() == (value + "").toUpperCase());
                  if (row.length > 0) {
                      this.noticeddoctorname = row[0].hidname;
                      this.noticeddoctor = row[0].hidkey;
                  } else {
                      var re = new RegExp("[\\u4e00-\\u9fa5]", "gi");
                      if (!re.test(value)) {
                          this.dialogTableVisible = true;
                      }
                  }
              }
          }
      },
      AlertReleaseChange(val) {
          var flag = val == "1" ? "0" : "1";
          this.tableDataDanger1 = this.tableDataDanger1All.filter(item => item.alertrelease == flag);
      },
      //单独上报危急值
      AlertDangerForOne() {
          if (this.alertrelease == "0") {
              //召回的时候不检查选项设置
              this.SetSingleAlertInfo();
              return;
          }
          if (!this.noticeddoctor && this.Options.alertneedrectelman == "1") {
              this.$alert("危急值上报必须填写通知人", "提示").then(() => {});
          } else {
              if(this.Options.alertmustinputalertuser == "1") {
                  this.$rm_Login({
                      type: "请输入上报人工号和密码",
                      btn: {
                          confirmBtnText: "确定",
                          cancelBtnText: "取消"
                      }
                  })
                      .then(res => {
                          if (res.flag == "1") {
                              this.ExaminreportMan = res.userid;
                              this.ExaminreportManName = res.username;
                              this.SetSingleAlertInfo();
                          } else {
                              this.$message.error("用户账号密码输入错误！");
                          }
                      })
                      .catch(e => {
                          console.log("error", e);
                      });
              } else {
                  this.SetSingleAlertInfo();
              }
          }
      },
      SetSingleAlertInfo() {
          var update = this.$refs.xTableDanger1.getSelectRecords();
          var results = [];
          for (let i = 0; i < update.length; i++) {
              var newrow = { reportid: this.myreportid, rpt_itemcode: update[i].rpt_itemcode, redo_result: update[i].redo_result };
              results.push(newrow);
          }
          var alertinfo = {
              chksendhis: this.sendbyhis ? "1" : "0",
              chkphone: this.noticebyphone ? "1" : "0",
              chkmessage: this.noticebymsg ? "1" : "0",
              chkrepeat: this.retelled ? "1" : "0",
              chkmsguser: this.msgtodutyman ? "1" : "0",
              chkmsggrdept: this.noticeinfec ? "1" : "0",
              alertuser: this.ExaminreportMan,
              rectelman: this.noticeddoctor,
              shortmsgtelnum: this.telephonenum,
              memo: this.remarks,
              hisdeptno: this.PatientInfo.req_deptno,
              hiswardno: this.PatientInfo.req_wardno,
              results: results
          };
          this.$tool
              .request({
                  url: "ucent/popalert",
                  method: "post",
                  data: {
                      action: "alertresultforone",
                      reportid: this.reportid,
                      alertinfo: alertinfo,
                      alertrelease: this.alertrelease
                  }
              })
              .then(res => {
                  if (res.hasOwnProperty("flag") && res.flag == "1") {
                      this.$message.success("危急值" + (this.alertrelease == "0" ? "召回" : "发布") + "成功");
                      this.$emit("cancel");
                  } else {
                      if(res.hasOwnProperty("Item1") && res.Item1 == -1) {
                          this.$confirm(`<span style="font-weight:bold;color:blue;font-size:18px;">${res.Item2 ? res.Item2.errorMsg[0].content : "错误"}</span>`, res.Item2 ? res.Item2.errorMsg[0].title : "提示", {
                              confirmButtonText: "确定",
                              cancelButtonText: "取消",
                              focusCancelButton: false,
                              closeOnClickModal: false,
                              showCancelButton: false,
                              dangerouslyUseHTMLString: true,
                              type: "warning",
                          })
                              .then((the) => {
                              })
                              .catch((cat) => {
                              });
                      }
                      
                  }
              });
      }
  }
};
</script>
<style scoped>
::v-deep .dialogdanger .el-textarea.is-disabled .el-textarea__inner {
  color: red;
}
table tr td:nth-child(odd) {
  text-align: right;
  white-space: nowrap;
}
table tr td:nth-child(even) {
  text-align: left;
}
table tr td:nth-child(1) {
  width: 80px;
}
table {
  font-size: 12px;
  border-collapse: separate;
  /* border-spacing: 5px; */
}
.dangerPatInfo tr td:nth-child(even) {
  width: 40px;
  border-bottom: 1px solid black;
}
</style>